package com.usabb.pojo.vo;


import com.usabb.domain.CombosItemValueDO;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

/**
 * 套餐管理页面, 新增
 */

@Slf4j
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
@ToString
public class CombosNewAddVO {
    private Long combosId;  //套餐Id

    private Long baseId;  // 月子中心Id
    private String combosName;
    private String combosFee;

    private List<Long> itemId;
    private List<String> itemIntro;


    public List<CombosItemValueDO> toValueDOList(final Long combosId) {
        List<CombosItemValueDO> valueDOS = new ArrayList<>(itemId.size());
        for (int i=0; i<itemId.size(); i++) {
            CombosItemValueDO valueDO = CombosItemValueDO.of(combosId, itemId.get(i), itemIntro.get(i));

            valueDOS.add(valueDO);
        }

        return valueDOS;
    }

}
